<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>epydoc.markup.doctest</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="epydoc-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://epydoc.sourceforge.net">epydoc 3.0beta1</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        <a href="epydoc-module.html">Package&nbsp;epydoc</a> ::
        <a href="epydoc.markup-module.html">Package&nbsp;markup</a> ::
        Module&nbsp;doctest
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="epydoc.markup.doctest-module.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== MODULE DESCRIPTION ==================== -->
<h1 class="epydoc">Module doctest</h1><span class="codelink"><a href="epydoc.markup.doctest-pysrc.html">source&nbsp;code</a></span><br /><br />
Syntax highlighting for doctest blocks.  This module defines two 
  functions, <a href="epydoc.markup.doctest-module.html#doctest_to_html" 
  class="link">doctest_to_html()</a> and <a 
  href="epydoc.markup.doctest-module.html#doctest_to_latex" 
  class="link">doctest_to_latex()</a>, which can be used to perform syntax 
  highlighting on doctest blocks.  It also defines the more general 
  <code>colorize_doctest()</code>, which could be used to do syntac 
  highlighting on doctest blocks with other output formats. (Both 
  <code>doctest_to_html()</code> and <code>doctest_to_latex()</code> are 
  defined using <code>colorize_doctest()</code>.)<br /><br />

<!-- ==================== CLASSES ==================== -->
<a name="section-Classes"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Classes</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Classes"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="epydoc.markup.doctest.DoctestColorizer-class.html" class="summary-name">DoctestColorizer</a><br />
      An abstract base class for performing syntax highlighting on 
        doctest blocks and other bits of Python code.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="epydoc.markup.doctest.XMLDoctestColorizer-class.html" class="summary-name">XMLDoctestColorizer</a><br />
      A subclass of DoctestColorizer that generates XML-like 
        output.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="epydoc.markup.doctest.HTMLDoctestColorizer-class.html" class="summary-name">HTMLDoctestColorizer</a><br />
      A subclass of DoctestColorizer that generates HTML output.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="epydoc.markup.doctest.LaTeXDoctestColorizer-class.html" class="summary-name">LaTeXDoctestColorizer</a><br />
      A subclass of DoctestColorizer that generates LaTeX output.
    </td>
  </tr>
</table>
<!-- ==================== FUNCTIONS ==================== -->
<a name="section-Functions"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Functions</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Functions"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="epydoc.markup.doctest-module.html#doctest_to_html" class="summary-sig-name">doctest_to_html</a>(<span class="summary-sig-arg">s</span>)</span><br />
      Perform syntax highlighting on the given doctest string, and 
      return the resulting HTML code.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="epydoc.markup.doctest-pysrc.html#doctest_to_html">source&nbsp;code</a></span>
            <br /><span class="codelink"><a href="javascript:void(0);" onclick="toggleCallGraph('call_graph_for_doctest_to_html-summary-div');return false;">call&nbsp;graph</a></span>&nbsp;
          </td>
        </tr>
      </table>
      <div style="display:none" id="call_graph_for_doctest_to_html-summary-div"><center>
<table border="0" cellpadding="0" cellspacing="0">
  <tr><td><center>  <map id="call_graph_for_doctest_to_html" name="call_graph_for_doctest_to_html">
<area shape="rect" href="epydoc.markup.doctest.DoctestColorizer&#45;class.html#colorize_doctest" title="DoctestColorizer.colorize_doctest()" alt="" coords="604,6,892,38" />
<area shape="rect" href="epydoc.markup.doctest&#45;module.html#doctest_to_html" title="doctest_to_html()" alt="" coords="400,6,555,38" />
<area shape="rect" href="epydoc.markup.epytext.ParsedEpytextDocstring&#45;class.html#_to_html" title="epytext.ParsedEpytextDocstring._to_html()" alt="" coords="6,6,352,38" />
</map>
  <img src="call_graph_for_doctest_to_html.gif" alt='' usemap="#call_graph_for_doctest_to_html" ismap="ismap" class="graph-without-title" />
</center></td></tr>
  <tr><th>Call Graph</th></tr>
</table><br />
</center></div>

    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="epydoc.markup.doctest-module.html#doctest_to_latex" class="summary-sig-name">doctest_to_latex</a>(<span class="summary-sig-arg">s</span>)</span><br />
      Perform syntax highlighting on the given doctest string, and 
      return the resulting LaTeX code.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="epydoc.markup.doctest-pysrc.html#doctest_to_latex">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
</table>
<!-- ==================== FUNCTION DETAILS ==================== -->
<a name="section-FunctionDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Function Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-FunctionDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="doctest_to_html"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">doctest_to_html</span>(<span class="sig-arg">s</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="epydoc.markup.doctest-pysrc.html#doctest_to_html">source&nbsp;code</a></span>&nbsp;
    <br /><span class="codelink"><a href="javascript:void(0);" onclick="toggleCallGraph('call_graph_for_doctest_to_html-div');return false;">call&nbsp;graph</a></span>&nbsp;</td>
  </table>
  <div style="display:none" id="call_graph_for_doctest_to_html-div"><center>
<table border="0" cellpadding="0" cellspacing="0">
  <tr><td><center>  <map id="call_graph_for_doctest_to_html" name="call_graph_for_doctest_to_html">
<area shape="rect" href="epydoc.markup.doctest.DoctestColorizer&#45;class.html#colorize_doctest" title="DoctestColorizer.colorize_doctest()" alt="" coords="604,6,892,38" />
<area shape="rect" href="epydoc.markup.doctest&#45;module.html#doctest_to_html" title="doctest_to_html()" alt="" coords="400,6,555,38" />
<area shape="rect" href="epydoc.markup.epytext.ParsedEpytextDocstring&#45;class.html#_to_html" title="epytext.ParsedEpytextDocstring._to_html()" alt="" coords="6,6,352,38" />
</map>
  <img src="call_graph_for_doctest_to_html.gif" alt='' usemap="#call_graph_for_doctest_to_html" ismap="ismap" class="graph-without-title" />
</center></td></tr>
  <tr><th>Call Graph</th></tr>
</table><br />
</center></div>

  Perform syntax highlighting on the given doctest string, and return 
  the resulting HTML code.  This code consists of a 
  <code>&lt;pre&gt;</code> block with class=py-doctest.  Syntax 
  highlighting is performed using the following css classes:
  <ul>
    <li>
      <code>py-prompt</code> -- the Python PS1 prompt (&gt;&gt;&gt;)
    </li>
    <li>
      <code>py-more</code> -- the Python PS2 prompt (...)
    </li>
    <li>
      <code>py-keyword</code> -- a Python keyword (for, if, etc.)
    </li>
    <li>
      <code>py-builtin</code> -- a Python builtin name (abs, dir, 
      etc.)
    </li>
    <li>
      <code>py-string</code> -- a string literal
    </li>
    <li>
      <code>py-comment</code> -- a comment
    </li>
    <li>
      <code>py-except</code> -- an exception traceback (up to the next 
      &gt;&gt;&gt;)
    </li>
    <li>
      <code>py-output</code> -- the output from a doctest block.
    </li>
    <li>
      <code>py-defname</code> -- the name of a function or class defined
      by a <code>def</code> or <code>class</code> statement.
    </li>
  </ul>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="doctest_to_latex"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">doctest_to_latex</span>(<span class="sig-arg">s</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="epydoc.markup.doctest-pysrc.html#doctest_to_latex">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  Perform syntax highlighting on the given doctest string, and return 
  the resulting LaTeX code.  This code consists of an <code>alltt</code> 
  environment.  Syntax highlighting is performed using the following new 
  latex commands, which must be defined externally:
  <ul>
    <li>
      <code>\pysrcprompt</code> -- the Python PS1 prompt 
      (&gt;&gt;&gt;)
    </li>
    <li>
      <code>\pysrcmore</code> -- the Python PS2 prompt (...)
    </li>
    <li>
      <code>\pysrckeyword</code> -- a Python keyword (for, if, etc.)
    </li>
    <li>
      <code>\pysrcbuiltin</code> -- a Python builtin name (abs, dir, 
      etc.)
    </li>
    <li>
      <code>\pysrcstring</code> -- a string literal
    </li>
    <li>
      <code>\pysrccomment</code> -- a comment
    </li>
    <li>
      <code>\pysrcexcept</code> -- an exception traceback (up to the 
      next &gt;&gt;&gt;)
    </li>
    <li>
      <code>\pysrcoutput</code> -- the output from a doctest block.
    </li>
    <li>
      <code>\pysrcdefname</code> -- the name of a function or class 
      defined by a <code>def</code> or <code>class</code> statement.
    </li>
  </ul>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="epydoc-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://epydoc.sourceforge.net">epydoc 3.0beta1</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    <a href="epydoc-log.html">Generated by Epydoc
    3.0beta1 on Tue Feb 27 06:03:07 2007</a>
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>
